﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Inventory.Domain.Models;

namespace Inventory.Database.Models
{
    public interface IEntityRepository<T>:IDisposable  
    {
        IQueryable<T> All { get; }
        IQueryable<T> AllIncluding(Expression<Func<T, object>>[] includedProperties);
        T Find(int id);
        void InsertOrUpdate(T entity);
        void Delete(int id);
        void Save();
    }

    public interface IMovieGenreRepository : IEntityRepository<MovieGenre>
    {
        
    }

    public interface IMovieRepository : IEntityRepository<Movie>
    {
        
    }

    public interface IMoviesMovieGenreRepository : IEntityRepository<MoviesMovieGenre>
    {
        
    }
}
